package com.mayikt.thread;

/**
 * @ClassName Thread001
 * @Author 蚂蚁课堂余胜军 QQ644064779 www.mayikt.com
 * @Version V1.0
 **/
public class Thread001 extends Thread {
    /**
     * 就是在run方法中写线程需要执行的代码
     */
    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName() + ",我是子线程");
    }

    public static void main(String[] args) {
        System.out.println(Thread.currentThread().getName() + "，我是主线程");
        new Thread001().start();
    }
}
